<template>
	<view style="height: 100%;width: 100%;">
		{{dictTag.label}}
	</view>
</template>

<script>
	import { getDict } from '@/components/DictTag/DictTag.js'
	export default {
		name: "DictTag",
		props: {
			option: {
				type: String,
				default: null,
			},
			value: [Number, String, Array],
		},
		data(){
			return {
				dictTag : '',
			}
		},
		created() {
			this.getOptions()
		},
		methods:{
			getOptions(){
				getDict(this.option, this.value).then(res =>{
					this.dictTag = res
				});
			}
		},
		
		
	};
</script>
<style scoped>
	.el-tag+.el-tag {
		margin-left: 10px;
	}
</style>